<ion-view cache-view="false" hide-back-button="true" title="{{curclass.name}}">
  <ion-nav-buttons side="left">
    <button class="button button-clear" ng-click="goBack()">
      <i class="icon ion-chevron-left"></i>
    </button>
  </ion-nav-buttons>
  <!-- <ion-nav-buttons side="right">
    <button class="button button-clear" ng-click="share()">
      <i class="icon ion-ios-upload-outline"></i>
    </button>
  </ion-nav-buttons> -->
  <ion-content>
    <div class="divider"></div>
    <ul class="list">
      <li class="item row no-padding" ng-repeat="showgoods in showlist">
        <div class="col col-50 class-piece" ng-click="changeToGoods(showgoods[0])">
          <div class="container">
            <!-- <div style="margin-bottom: -20px; z-index: 1; position: absolute">
              <img alt="" src="img/hd/tab_cx.png" style="width: 40px">
            </div> -->
            <img alt="" ng-if="!showgoods[0].smimgurl"  src="img/hd/pic_nm.png" style="width: 100%"/>
            <img alt="" ng-if="showgoods[0].smimgurl"  ng-src="{{showgoods[0].smimgurl}}" style="width: 100%"/>
            <h2 class="goods-name">{{showgoods[0].name}} {{showgoods[0].scale}}</h2>
            <div style="float: left; white-space: nowrap; word-break: keep-all;">
              <span class="goods-cost">{{showgoods[0].kj_price}}
                <span style="font-size:12px">元</span>
              </span>
            </div>
            <div ng-if="showgoods[0].amount > 0" style="float: right; font-size: 20px;width: 30px; height: 30px;padding: 5px; border: 1px solid #eee; border-radius: 2px;" ng-click="addCart(showgoods[0]); $event.stopPropagation();">
              <i class="icon ion-ios-cart-outline"></i>
            </div>
            <div ng-if="showgoods[0].amount <= 0" style="float: right; color: #d1d1d1">售完</div>
          </div>
        </div>
        <div class="col col-50 class-piece" ng-show="showgoods[1].name" ng-click="changeToGoods(showgoods[1])">
          <div class="container">
            <!-- <div style="margin-bottom: -20px; z-index: 1; position: absolute"><img alt="" src="img/hd/tab_cx.png" style="width: 40px"></div> -->
            <img alt="" ng-if="!showgoods[1].smimgurl"  src="img/hd/pic_nm.png" style="width: 100%"/>
            <img alt="" ng-if="showgoods[1].smimgurl"  ng-src="{{showgoods[1].smimgurl}}" style="width: 100%"/>
            <h2 class="goods-name">{{showgoods[1].name}}</h2>
            <div style="float: left; white-space: nowrap; word-break: keep-all;">
              <span class="goods-cost">{{showgoods[1].kj_price}}
                <span style="font-size:12px; display: inline;">元</span>
              </span>
            </div>
            <div ng-if="showgoods[1].amount > 0" style="float: right; font-size: 20px;width: 30px; height: 30px;padding: 5px; border: 1px solid #eee; border-radius: 2px;" ng-click="addCart(showgoods[1]); $event.stopPropagation();">
              <i class="icon ion-ios-cart-outline"></i>
            </div>
            <div ng-if="showgoods[1].amount <= 0" style="float: right; color: #d1d1d1">售完</div>
          </div>
        </div>
      </li>
      <li class="item item-divider " style="text-align: center" ng-show="showgoods">
        没有更多商品
      </li>
    </ul>
  </ion-content>

  <div class="mycart" ui-sref="order.cart" ui-sref-opts="{reload: true}">
    <div class="button button-icon icon ion-android-cart" style="color: #fff; background-color: rgba(0,0,0,0.5); width: 50px; height: 40px;border-radius: 10px;"></div>
    <span class="cart-count" ng-hide="!count || count == 0">{{count}}</span>
  </div>
</ion-view>
